package com.fyp.ptma.dao.repository;

import java.util.List;

import javax.persistence.PersistenceException;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.exception.ConstraintViolationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.fyp.ptma.dao.repository.irepository.INotificationDao;
import com.fyp.ptma.model.ApplicationVersion;
import com.fyp.ptma.model.Notification;

@Repository
public class NotificationDao implements INotificationDao {
	@Autowired
	private SessionFactory sessionFactory;

	public Long save(Object objToSave) throws PersistenceException,
			ConstraintViolationException {
		// TODO Auto-generated method stub
		return null;
	}

	public Long update(Object objToUpdate) throws PersistenceException {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean delete(Object objToDelete) throws PersistenceException,
			ConstraintViolationException {
		// TODO Auto-generated method stub
		return false;
	}

	public List<Notification> getNotificationsForVersion(
			ApplicationVersion applicationVersion) throws HibernateException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Session openSession() {
		// TODO Auto-generated method stub
		return sessionFactory.getCurrentSession();
	}

	

	@Override
	public void saveOrUpdate(Object objToSave) throws PersistenceException,
			ConstraintViolationException {
		// TODO Auto-generated method stub

	}

}
